﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using lucere.index.write;

namespace lucere.index.merge
{
    /// <summary><p/>Expert: {@link IndexWriter} uses an instance
    /// implementing this interface to execute the merges
    /// selected by a {@link MergePolicy}.  The default
    /// MergeScheduler is {@link ConcurrentMergeScheduler}.<p/>
    /// 
    /// <p/><b>NOTE:</b> This API is new and still experimental
    /// (subject to change suddenly in the next release)<p/>
    /// 
    /// <p/><b>NOTE</b>: This class typically requires access to
    /// package-private APIs (eg, SegmentInfos) to do its job;
    /// if you implement your own MergePolicy, you'll need to put
    /// it in package Lucene.Net.Index in order to use
    /// these APIs.
    /// </summary>

    public interface IMergeScheduler : IDisposable
    {
        /// <summary>Run the merges provided by {@link IndexWriter#GetNextMerge()}. </summary>
        void Merge(IIndexWriter indexWriter);
    }
}
